export default {
  packShare(shareObject) {
    let target = shareObject ? share : this.share
    return {
      title: target.title,
      imageUrl: target.imageUrl
    }
  },
  data() {
    return {
      share: {
        title: '一个神奇的小程序',
        imageUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg',
      }
    }
  },
  onShareAppMessage(share) { //发送给朋友
    return this.packShare(share)
  },
  onShareTimeline(share) { //分享到朋友圈
    return this.packShare(share)
  },
}
